#include <iostream>
#include "color.hpp"
#include "vector3.hpp"

using namespace std;

int imageWidth=256;
int imageHeight=256;


int main(){
    std::cout << "P3\n" << imageWidth << ' ' << imageHeight << "\n255\n";

    for (int j = 0; j < imageHeight; j++) {
        std::clog << "\rScanlines remaining: " << (imageHeight - j) << ' ' << std::flush;
        for (int i = 0; i < imageWidth; i++) {
            WriteColor(std::cout, Color(double(i) / (imageWidth - 1), double(j) / (imageHeight - 1), 0));
        }
    }
    std::clog << "\rDone.                 \n";
    return 0;
}